<?php

class Application_Model_DbTable_User extends Zend_Db_Table_Abstract
{

    protected $_name = 'profile_table';
 
    public function getUser($username){
    
    	$row = $this->fetchRow($this->select()->where(array('username = ?',$username)));
    	return $row;
    	
    
    }
    public function isPresent($username){
    
    	$row = $this->fetchRow($this->select()->where(array('username = ?',$username)));
    	
    
    
    }
    
    public function isLogged(){
    
		    
    
    }
	
    public function createUser($username,$password, $name, $surname,$email){
    	
    	$row = $this->createRow();
    	$row->userid = str_shuffle(substr(now(),1) . strtr($username,0,1));
    	$row->username = $username;
    	$row->password = $password;
    	$row->name = $name;
    	$row->surname = $surname;
    	$row->email = $email;
   		
    	$row->save;
    
    }
}

